home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 11 / FM Towns Free Software Collection 11.iso / t_os / shell / tokei4 / src / icongui.c < prev    next >
C/C++ Source or Header  |  1995-04-04  |  8KB  |  336 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <winb.h>
  4. #include <te.h>
  5. #include <fntb.h>
  6. #include <gui.h>
  7.  
  8. extern int    iconBaseHyperID ;
  9. extern int    MJ_BASEOBJ ;
  10. extern int    iconBaseWindowID ;
  11. extern int    windowFunc() ;
  12. extern int    iconMenuID[3] ;
  13. extern int    iconMenuItemID[11] ;
  14. extern int    menuCallFunc() ;
  15. extern int    aboutFunc() ;
  16. extern int    switchSetFunc() ;
  17. extern int    timerSetFunc() ;
  18. extern int    quitFunc() ;
  19. extern int    dialogBaseHyperID ;
  20.  
  21. #define ALIGN    4
  22. #define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)
  23.  
  24. /*    MMI_init 用データ    */
  25.  
  26. /*    ヘッダ    */
  27.  
  28. MMIINIT    initDataICONGUI = { "MmiInit",  17, 0 } ;
  29.  
  30. /* iconBaseHyperID */
  31.  
  32. static MMIPACKET d001 = {    &iconBaseHyperID,
  33.                             &MJ_BASEOBJ,
  34.                             &MJ_HYPER,
  35.                             OFFSET(HYPER),
  36.                             MS_NONE
  37.                         } ;
  38. static HYPER    d001d = {    MS_NONEL40,
  39.                                0,   0,   5,   5, 0, 0, 0,
  40.                             MS_NONEL40,
  41.                         } ;
  42.  
  43. /* iconBaseWindowID */
  44.  
  45. static MMIPACKET d002 = {    &iconBaseWindowID,
  46.                             &iconBaseHyperID,
  47.                             &MJ_WINDOWL40,
  48.                             OFFSET(WINDOWL40),
  49.                             MS_NONE
  50.                         } ;
  51. static WINDOWL40    d002d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_HIDEL40,
  52.                              288, 220, 357, 266, 8, 1, 9,
  53.                             MS_PANELL40 | MS_FRAMEL40,
  54.                             NULL,   0,   0,
  55.                                4,   4,  58,  16,
  56.                              128,  96, 640, 480,
  57.                             windowFunc,
  58.                             NULL,
  59.                         } ;
  60.  
  61. /* iconMenuID[0] */
  62.  
  63. static MMIPACKET d003 = {    &iconMenuID[0],
  64.                             &iconBaseWindowID,
  65.                             &MJ_MENUL40,
  66.                             OFFSET(MENUL40),
  67.                             MS_NONE
  68.                         } ;
  69. static MENUL40    d003d =     {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_SKEYL40 | MS_HORIL40,
  70.                              292, 241, 353, 262, 8, 1, 8,
  71.                             MS_NONEL40,
  72.                             NULL,   0
  73.                         } ;
  74.  
  75. /* iconMenuItemID[0] */
  76.  
  77. static MMIPACKET d004 = {    &iconMenuItemID[0],
  78.                             &iconMenuID[0],
  79.                             &MJ_MITEML40,
  80.                             OFFSET(MITEML40),
  81.                             MS_NONE
  82.                         } ;
  83. static MITEML40    d004d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  84.                              292, 241, 353, 262, 8, 9, 8,
  85.                             MS_PANELL40,
  86.                             menuCallFunc,
  87.                             0x0000,  -1,
  88.                             "時計ー",
  89.                                1,  12,  12,
  90.                             MS_OUTLINEL40,
  91.                               -2,   0,
  92.                                0
  93.                         } ;
  94.  
  95. /* iconMenuID[1] */
  96.  
  97. static MMIPACKET d005 = {    &iconMenuID[1],
  98.                             &iconMenuItemID[0],
  99.                             &MJ_MENUL40,
  100.                             OFFSET(MENUL40),
  101.                             MS_NONE
  102.                         } ;
  103. static MENUL40    d005d =     {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_SKEYL40 | MS_CHECKL40,
  104.                              268, 273, 406, 378, 8,15, 8,
  105.                             MS_SRECTL40 | MS_FRAMEL40,
  106.                             NULL,   0
  107.                         } ;
  108.  
  109. /* iconMenuItemID[1] */
  110.  
  111. static MMIPACKET d006 = {    &iconMenuItemID[1],
  112.                             &iconMenuID[1],
  113.                             &MJ_MITEML40,
  114.                             OFFSET(MITEML40),
  115.                             MS_NONE
  116.                         } ;
  117. static MITEML40    d006d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  118.                              270, 275, 398, 292, 8,15, 8,
  119.                             MS_NONEL40,
  120.                             aboutFunc,
  121.                             0x0041,  -1,
  122.                             "時計ーについて...",
  123.                                1,  12,  12,
  124.                             MS_NONEL40,
  125.                                0,   0,
  126.                                0
  127.                         } ;
  128.  
  129. /* iconMenuItemID[2] */
  130.  
  131. static MMIPACKET d007 = {    &iconMenuItemID[2],
  132.                             &iconMenuID[1],
  133.                             &MJ_MITEML40,
  134.                             OFFSET(MITEML40),
  135.                             MS_NONE
  136.                         } ;
  137. static MITEML40    d007d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  138.                              270, 292, 398, 309, 8,15, 8,
  139.                             MS_NONEL40,
  140.                             0,
  141.                             0x0000,  -1,
  142.                             "スイッチ設定",
  143.                                1,  12,  12,
  144.                             MS_NONEL40,
  145.                                0,   0,
  146.                                0
  147.                         } ;
  148.  
  149. /* iconMenuID[2] */
  150.  
  151. static MMIPACKET d008 = {    &iconMenuID[2],
  152.                             &iconMenuItemID[2],
  153.                             &MJ_MENUL40,
  154.                             OFFSET(MENUL40),
  155.                             MS_NONE
  156.                         } ;
  157. static MENUL40    d008d =     {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_SKEYL40 | MS_CHECKL40,
  158.                              409, 294, 519, 400, 8,15, 8,
  159.                             MS_SRECTL40 | MS_FRAMEL40,
  160.                             NULL,   0
  161.                         } ;
  162.  
  163. /* iconMenuItemID[6] */
  164.  
  165. static MMIPACKET d009 = {    &iconMenuItemID[6],
  166.                             &iconMenuID[2],
  167.                             &MJ_MITEML40,
  168.                             OFFSET(MITEML40),
  169.                             MS_NONE
  170.                         } ;
  171. static MITEML40    d009d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  172.                              411, 296, 507, 313, 8,15, 8,
  173.                             MS_NONEL40,
  174.                             switchSetFunc,
  175.                             0x005a,  -1,
  176.                             "1",
  177.                                1,  12,  12,
  178.                             MS_NONEL40,
  179.                                0,   0,
  180.                                0
  181.                         } ;
  182.  
  183. /* iconMenuItemID[7] */
  184.  
  185. static MMIPACKET d010 = {    &iconMenuItemID[7],
  186.                             &iconMenuID[2],
  187.                             &MJ_MITEML40,
  188.                             OFFSET(MITEML40),
  189.                             MS_NONE
  190.                         } ;
  191. static MITEML40    d010d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  192.                              411, 313, 513, 330, 8,15, 8,
  193.                             MS_NONEL40,
  194.                             switchSetFunc,
  195.                             0x0058,  -1,
  196.                             "2",
  197.                                1,  12,  12,
  198.                             MS_NONEL40,
  199.                                0,   0,
  200.                                0
  201.                         } ;
  202.  
  203. /* iconMenuItemID[8] */
  204.  
  205. static MMIPACKET d011 = {    &iconMenuItemID[8],
  206.                             &iconMenuID[2],
  207.                             &MJ_MITEML40,
  208.                             OFFSET(MITEML40),
  209.                             MS_NONE
  210.                         } ;
  211. static MITEML40    d011d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  212.                              410, 334, 512, 351, 8,15, 8,
  213.                             MS_NONEL40,
  214.                             switchSetFunc,
  215.                             0x0043,  -1,
  216.                             "3",
  217.                                1,  12,  12,
  218.                             MS_NONEL40,
  219.                                0,   0,
  220.                                0
  221.                         } ;
  222.  
  223. /* iconMenuItemID[9] */
  224.  
  225. static MMIPACKET d012 = {    &iconMenuItemID[9],
  226.                             &iconMenuID[2],
  227.                             &MJ_MITEML40,
  228.                             OFFSET(MITEML40),
  229.                             MS_NONE
  230.                         } ;
  231. static MITEML40    d012d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  232.                              410, 353, 512, 368, 8,15, 8,
  233.                             MS_NONEL40,
  234.                             switchSetFunc,
  235.                             0x004f,  -1,
  236.                             "毎時",
  237.                                1,  12,  12,
  238.                             MS_NONEL40,
  239.                                0,   0,
  240.                                0
  241.                         } ;
  242.  
  243. /* iconMenuItemID[10] */
  244.  
  245. static MMIPACKET d013 = {    &iconMenuItemID[10],
  246.                             &iconMenuID[2],
  247.                             &MJ_MITEML40,
  248.                             OFFSET(MITEML40),
  249.                             MS_NONE
  250.                         } ;
  251. static MITEML40    d013d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  252.                              411, 373, 513, 390, 8,15, 8,
  253.                             MS_NONEL40,
  254.                             switchSetFunc,
  255.                             0x0048,  -1,
  256.                             "毎30分",
  257.                                1,  12,  12,
  258.                             MS_NONEL40,
  259.                                0,   0,
  260.                                0
  261.                         } ;
  262.  
  263. /* iconMenuItemID[3] */
  264.  
  265. static MMIPACKET d014 = {    &iconMenuItemID[3],
  266.                             &iconMenuID[1],
  267.                             &MJ_MITEML40,
  268.                             OFFSET(MITEML40),
  269.                             MS_NONE
  270.                         } ;
  271. static MITEML40    d014d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  272.                              270, 315, 398, 332, 8,15, 8,
  273.                             MS_NONEL40,
  274.                             timerSetFunc,
  275.                             0x0054,  -1,
  276.                             "タイマー登録...",
  277.                                1,  12,  12,
  278.                             MS_NONEL40,
  279.                                0,   0,
  280.                                0
  281.                         } ;
  282.  
  283. /* iconMenuItemID[4] */
  284.  
  285. static MMIPACKET d015 = {    &iconMenuItemID[4],
  286.                             &iconMenuID[1],
  287.                             &MJ_MITEML40,
  288.                             OFFSET(MITEML40),
  289.                             MS_NONE
  290.                         } ;
  291. static MITEML40    d015d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  292.                              269, 332, 398, 349, 8,15, 8,
  293.                             MS_NONEL40,
  294.                             0,
  295.                             0x0000,  -1,
  296.                             NULL,
  297.                                1,  12,  12,
  298.                             MS_NONEL40,
  299.                                0,   0,
  300.                                0
  301.                         } ;
  302.  
  303. /* iconMenuItemID[5] */
  304.  
  305. static MMIPACKET d016 = {    &iconMenuItemID[5],
  306.                             &iconMenuID[1],
  307.                             &MJ_MITEML40,
  308.                             OFFSET(MITEML40),
  309.                             MS_NONE
  310.                         } ;
  311. static MITEML40    d016d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_LEFTL40,
  312.                              269, 352, 395, 369, 8,15, 8,
  313.                             MS_NONEL40,
  314.                             quitFunc,
  315.                             0x0051,  -1,
  316.                             "終了",
  317.                                1,  12,  12,
  318.                             MS_NONEL40,
  319.                                0,   0,
  320.                                0
  321.                         } ;
  322.  
  323. /* dialogBaseHyperID */
  324.  
  325. static MMIPACKET d017 = {    &dialogBaseHyperID,
  326.                             &MJ_BASEOBJ,
  327.                             &MJ_HYPER,
  328.                             0,
  329.                             MS_NONE
  330.                         } ;
  331. static HYPER    d017d = {    MS_NONEL40,
  332.                                0,   0,   5,   5, 0, 0, 0,
  333.                             MS_NONEL40,
  334.                         } ;
  335.  
  336.